import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/Inventory_system/list_department_responsibilities_list_entity.dart';

ListDepartmentResponsibilitiesListEntity $ListDepartmentResponsibilitiesListEntityFromJson(Map<String, dynamic> json) {
  final ListDepartmentResponsibilitiesListEntity listDepartmentResponsibilitiesListEntity = ListDepartmentResponsibilitiesListEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    listDepartmentResponsibilitiesListEntity.id = id;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    listDepartmentResponsibilitiesListEntity.companyCode = companyCode;
  }
  final String? dutyDescribe = jsonConvert.convert<String>(json['dutyDescribe']);
  if (dutyDescribe != null) {
    listDepartmentResponsibilitiesListEntity.dutyDescribe = dutyDescribe;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    listDepartmentResponsibilitiesListEntity.createBy = createBy;
  }
  final dynamic createById = json['createById'];
  if (createById != null) {
    listDepartmentResponsibilitiesListEntity.createById = createById;
  }
  final String? departmentId = jsonConvert.convert<String>(json['departmentId']);
  if (departmentId != null) {
    listDepartmentResponsibilitiesListEntity.departmentId = departmentId;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    listDepartmentResponsibilitiesListEntity.createDate = createDate;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    listDepartmentResponsibilitiesListEntity.updateBy = updateBy;
  }
  final dynamic updateById = json['updateById'];
  if (updateById != null) {
    listDepartmentResponsibilitiesListEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    listDepartmentResponsibilitiesListEntity.updateDate = updateDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    listDepartmentResponsibilitiesListEntity.deleted = deleted;
  }
  return listDepartmentResponsibilitiesListEntity;
}

Map<String, dynamic> $ListDepartmentResponsibilitiesListEntityToJson(ListDepartmentResponsibilitiesListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['companyCode'] = entity.companyCode;
  data['dutyDescribe'] = entity.dutyDescribe;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['departmentId'] = entity.departmentId;
  data['createDate'] = entity.createDate;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['deleted'] = entity.deleted;
  return data;
}

extension ListDepartmentResponsibilitiesListEntityExtension on ListDepartmentResponsibilitiesListEntity {
  ListDepartmentResponsibilitiesListEntity copyWith({
    String? id,
    String? companyCode,
    String? dutyDescribe,
    String? createBy,
    dynamic createById,
    String? departmentId,
    String? createDate,
    String? updateBy,
    dynamic updateById,
    String? updateDate,
    String? deleted,
  }) {
    return ListDepartmentResponsibilitiesListEntity()
      ..id = id ?? this.id
      ..companyCode = companyCode ?? this.companyCode
      ..dutyDescribe = dutyDescribe ?? this.dutyDescribe
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..departmentId = departmentId ?? this.departmentId
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..deleted = deleted ?? this.deleted;
  }
}
